<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('成绩修改')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-grad-edit" th:object="${grad}">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">编号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="id" id="id" th:field="*{id}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">姓名：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="name" id="name" th:field="*{name}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">语文成绩：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="chinesegrads" id="chinesegrads" th:field="*{chinesegrads}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">数学成绩：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="mathgrads" id="mathgrads" th:field="*{mathgrads}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">英语成绩：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="englishgrads" id="englishgrads" th:field="*{englishgrads}" required>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "system/grad";

    $("#form-grad-edit").validate({
        onkeyup: false,
        rules: {
            grads: {
                required: true,
                number: true,
                range: [0, 100]
            }
        },

    });
    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-grad-edit').serialize());
        }
    }
</script>
</body>
</html>
